


using System;
using SubSonic.Schema;
using System.Collections.Generic;
using SubSonic.DataProviders;
using System.Data;

namespace BlogManager.Data.Entities {
	
        /// <summary>
        /// Table: Blog_Categories
        /// Primary Key: Id
        /// </summary>

        public class Blog_CategoriesTable: DatabaseTable {
            
            public Blog_CategoriesTable(IDataProvider provider):base("Blog_Categories",provider){
                ClassName = "Blog_Category";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("Id", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("SiteId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Name", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 250
                });
                    
                
                
            }

            public IColumn Id{
                get{
                    return this.GetColumn("Id");
                }
            }
				
   			public static string IdColumn{
			      get{
        			return "Id";
      			}
		    }
            
            public IColumn SiteId{
                get{
                    return this.GetColumn("SiteId");
                }
            }
				
   			public static string SiteIdColumn{
			      get{
        			return "SiteId";
      			}
		    }
            
            public IColumn Name{
                get{
                    return this.GetColumn("Name");
                }
            }
				
   			public static string NameColumn{
			      get{
        			return "Name";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Blog_Tags
        /// Primary Key: Id
        /// </summary>

        public class Blog_TagsTable: DatabaseTable {
            
            public Blog_TagsTable(IDataProvider provider):base("Blog_Tags",provider){
                ClassName = "Blog_Tag";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("Id", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("SiteId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Name", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 250
                });
                    
                
                
            }

            public IColumn Id{
                get{
                    return this.GetColumn("Id");
                }
            }
				
   			public static string IdColumn{
			      get{
        			return "Id";
      			}
		    }
            
            public IColumn SiteId{
                get{
                    return this.GetColumn("SiteId");
                }
            }
				
   			public static string SiteIdColumn{
			      get{
        			return "SiteId";
      			}
		    }
            
            public IColumn Name{
                get{
                    return this.GetColumn("Name");
                }
            }
				
   			public static string NameColumn{
			      get{
        			return "Name";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Blog_Post
        /// Primary Key: Id
        /// </summary>

        public class Blog_PostTable: DatabaseTable {
            
            public Blog_PostTable(IDataProvider provider):base("Blog_Post",provider){
                ClassName = "Blog_Post";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("Id", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("SiteId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Title", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 500
                });

                Columns.Add(new DatabaseColumn("PublicationDate", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.DateTime,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Content", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = -1
                });

                Columns.Add(new DatabaseColumn("UserId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn Id{
                get{
                    return this.GetColumn("Id");
                }
            }
				
   			public static string IdColumn{
			      get{
        			return "Id";
      			}
		    }
            
            public IColumn SiteId{
                get{
                    return this.GetColumn("SiteId");
                }
            }
				
   			public static string SiteIdColumn{
			      get{
        			return "SiteId";
      			}
		    }
            
            public IColumn Title{
                get{
                    return this.GetColumn("Title");
                }
            }
				
   			public static string TitleColumn{
			      get{
        			return "Title";
      			}
		    }
            
            public IColumn PublicationDate{
                get{
                    return this.GetColumn("PublicationDate");
                }
            }
				
   			public static string PublicationDateColumn{
			      get{
        			return "PublicationDate";
      			}
		    }
            
            public IColumn Content{
                get{
                    return this.GetColumn("Content");
                }
            }
				
   			public static string ContentColumn{
			      get{
        			return "Content";
      			}
		    }
            
            public IColumn UserId{
                get{
                    return this.GetColumn("UserId");
                }
            }
				
   			public static string UserIdColumn{
			      get{
        			return "UserId";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Blog_Categories_Posts
        /// Primary Key: BlogCategoryId
        /// </summary>

        public class Blog_Categories_PostsTable: DatabaseTable {
            
            public Blog_Categories_PostsTable(IDataProvider provider):base("Blog_Categories_Posts",provider){
                ClassName = "Blog_Categories_Post";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("BlogCategoryId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("BlogPostId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn BlogCategoryId{
                get{
                    return this.GetColumn("BlogCategoryId");
                }
            }
				
   			public static string BlogCategoryIdColumn{
			      get{
        			return "BlogCategoryId";
      			}
		    }
            
            public IColumn BlogPostId{
                get{
                    return this.GetColumn("BlogPostId");
                }
            }
				
   			public static string BlogPostIdColumn{
			      get{
        			return "BlogPostId";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Blog_Comments
        /// Primary Key: Id
        /// </summary>

        public class Blog_CommentsTable: DatabaseTable {
            
            public Blog_CommentsTable(IDataProvider provider):base("Blog_Comments",provider){
                ClassName = "Blog_Comment";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("Id", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("SiteId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("BlogPostId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("PublicationDate", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.DateTime,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Comment", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = -1
                });

                Columns.Add(new DatabaseColumn("UserId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn Id{
                get{
                    return this.GetColumn("Id");
                }
            }
				
   			public static string IdColumn{
			      get{
        			return "Id";
      			}
		    }
            
            public IColumn SiteId{
                get{
                    return this.GetColumn("SiteId");
                }
            }
				
   			public static string SiteIdColumn{
			      get{
        			return "SiteId";
      			}
		    }
            
            public IColumn BlogPostId{
                get{
                    return this.GetColumn("BlogPostId");
                }
            }
				
   			public static string BlogPostIdColumn{
			      get{
        			return "BlogPostId";
      			}
		    }
            
            public IColumn PublicationDate{
                get{
                    return this.GetColumn("PublicationDate");
                }
            }
				
   			public static string PublicationDateColumn{
			      get{
        			return "PublicationDate";
      			}
		    }
            
            public IColumn Comment{
                get{
                    return this.GetColumn("Comment");
                }
            }
				
   			public static string CommentColumn{
			      get{
        			return "Comment";
      			}
		    }
            
            public IColumn UserId{
                get{
                    return this.GetColumn("UserId");
                }
            }
				
   			public static string UserIdColumn{
			      get{
        			return "UserId";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Blog_Tags_Posts
        /// Primary Key: BlogPostId
        /// </summary>

        public class Blog_Tags_PostsTable: DatabaseTable {
            
            public Blog_Tags_PostsTable(IDataProvider provider):base("Blog_Tags_Posts",provider){
                ClassName = "Blog_Tags_Post";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("BlogTagId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("BlogPostId", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn BlogTagId{
                get{
                    return this.GetColumn("BlogTagId");
                }
            }
				
   			public static string BlogTagIdColumn{
			      get{
        			return "BlogTagId";
      			}
		    }
            
            public IColumn BlogPostId{
                get{
                    return this.GetColumn("BlogPostId");
                }
            }
				
   			public static string BlogPostIdColumn{
			      get{
        			return "BlogPostId";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Sites
        /// Primary Key: Id
        /// </summary>

        public class SitesTable: DatabaseTable {
            
            public SitesTable(IDataProvider provider):base("Sites",provider){
                ClassName = "Site";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("Id", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = false,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Url", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 255
                });

                Columns.Add(new DatabaseColumn("FTPUser", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });

                Columns.Add(new DatabaseColumn("FTPPassword", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });
                    
                
                
            }

            public IColumn Id{
                get{
                    return this.GetColumn("Id");
                }
            }
				
   			public static string IdColumn{
			      get{
        			return "Id";
      			}
		    }
            
            public IColumn Url{
                get{
                    return this.GetColumn("Url");
                }
            }
				
   			public static string UrlColumn{
			      get{
        			return "Url";
      			}
		    }
            
            public IColumn FTPUser{
                get{
                    return this.GetColumn("FTPUser");
                }
            }
				
   			public static string FTPUserColumn{
			      get{
        			return "FTPUser";
      			}
		    }
            
            public IColumn FTPPassword{
                get{
                    return this.GetColumn("FTPPassword");
                }
            }
				
   			public static string FTPPasswordColumn{
			      get{
        			return "FTPPassword";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: Role
        /// Primary Key: Id
        /// </summary>

        public class RoleTable: DatabaseTable {
            
            public RoleTable(IDataProvider provider):base("Role",provider){
                ClassName = "Role";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("Id", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Name", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });

                Columns.Add(new DatabaseColumn("Description", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = true,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 250
                });
                    
                
                
            }

            public IColumn Id{
                get{
                    return this.GetColumn("Id");
                }
            }
				
   			public static string IdColumn{
			      get{
        			return "Id";
      			}
		    }
            
            public IColumn Name{
                get{
                    return this.GetColumn("Name");
                }
            }
				
   			public static string NameColumn{
			      get{
        			return "Name";
      			}
		    }
            
            public IColumn Description{
                get{
                    return this.GetColumn("Description");
                }
            }
				
   			public static string DescriptionColumn{
			      get{
        			return "Description";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: User_Role
        /// Primary Key: 
        /// </summary>

        public class User_RoleTable: DatabaseTable {
            
            public User_RoleTable(IDataProvider provider):base("User_Role",provider){
                ClassName = "User_Role";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("UserId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("RoleId", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.Int32,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = true,
	                MaxLength = 0
                });
                    
                
                
            }

            public IColumn UserId{
                get{
                    return this.GetColumn("UserId");
                }
            }
				
   			public static string UserIdColumn{
			      get{
        			return "UserId";
      			}
		    }
            
            public IColumn RoleId{
                get{
                    return this.GetColumn("RoleId");
                }
            }
				
   			public static string RoleIdColumn{
			      get{
        			return "RoleId";
      			}
		    }
            
                    
        }
        
        /// <summary>
        /// Table: User
        /// Primary Key: Id
        /// </summary>

        public class UserTable: DatabaseTable {
            
            public UserTable(IDataProvider provider):base("User",provider){
                ClassName = "User";
                SchemaName = "dbo";
                

                Columns.Add(new DatabaseColumn("Id", this)
                {
	                IsPrimaryKey = true,
	                DataType = DbType.Int64,
	                IsNullable = false,
	                AutoIncrement = true,
	                IsForeignKey = true,
	                MaxLength = 0
                });

                Columns.Add(new DatabaseColumn("Email", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 500
                });

                Columns.Add(new DatabaseColumn("Password", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 10
                });

                Columns.Add(new DatabaseColumn("UserName", this)
                {
	                IsPrimaryKey = false,
	                DataType = DbType.String,
	                IsNullable = false,
	                AutoIncrement = false,
	                IsForeignKey = false,
	                MaxLength = 50
                });
                    
                
                
            }

            public IColumn Id{
                get{
                    return this.GetColumn("Id");
                }
            }
				
   			public static string IdColumn{
			      get{
        			return "Id";
      			}
		    }
            
            public IColumn Email{
                get{
                    return this.GetColumn("Email");
                }
            }
				
   			public static string EmailColumn{
			      get{
        			return "Email";
      			}
		    }
            
            public IColumn Password{
                get{
                    return this.GetColumn("Password");
                }
            }
				
   			public static string PasswordColumn{
			      get{
        			return "Password";
      			}
		    }
            
            public IColumn UserName{
                get{
                    return this.GetColumn("UserName");
                }
            }
				
   			public static string UserNameColumn{
			      get{
        			return "UserName";
      			}
		    }
            
                    
        }
        
}